<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <form action="/form" method="get" @submit.prevent="fun">
      <input type="text">
      <input type="submit">
    </form>
  </div>
  <script src="../Dev-tools/vue.js"></script>
  <script>
    new Vue({
      el:"#app",
      methods:{
        fun(){
          console.log("我是代替默认事件的函数")
        }
      }
    })
    // 事件修饰符
    // .prevent:阻止事件的默认行为
  </script>
</body>
</html>